import Vue from 'vue'
import Vuex from 'vuex'
import mdOrder from './modules/order.js'
import mdApprove from './modules/approve.js'
import mdOrderp from './modules/orderp.js'
import enforce_law from './modules/enforce_law.js'
Vue.use(Vuex)

const store = new Vuex.Store({
	modules: {
		mdOrder,
		mdApprove,
		mdOrderp,
		enforce_law
	},
	state: {
		userInfo: {},
		path: 1,
		center: [], // 四至范围中心点
		polygonArea: '', //四至范围面积值
		tab_flag: 0,
		// uucs
		tokenUUCS: '',
		authCode: '', //浙政钉用户code
	},
	getters: {

	},
	mutations: {
		setUserInfo(state, userInfo) {
			state.userInfo = userInfo
		},
		setTokenUUCS(state, tokenUUCS) {
			state.tokenUUCS = tokenUUCS
		},
		setAuthCode(state, authCode) {
			state.authCode = authCode
		},
	},
	actions: {}
})
export default store
